<?php

namespace App\Http\Resources\Backend;

use Illuminate\Http\Resources\Json\Resource;

/**
 * Class WechatMenuResource
 * @package App\Http\Resources\Backend
 */
class WechatMenuResource extends Resource
{
    /**
     * @param \Illuminate\Http\Request $request
     * @return array
     */
    public function toArray($request)
    {
        return [
            'id' => $this->id,
            'sub_id' => $this->sub_id,
            'name' => $this->name,
            'type' => $this->type,
            'key' => $this->key,
            'text' => $this->text,
            'url' => $this->url,
            'is_enable' => $this->is_enable,
            'sort' => $this->sort,
            'group_id' => $this->group_id,
            'media_id' => $this->media_id,
            'pagepath' => $this->pagepath,
            'miniprogram_appid' => $this->miniprogram_appid
        ];
    }
}